package cn.huijielong.modules.cm.controller;

import java.util.List;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.Page;

import cn.huijielong.common.annotation.NoAuthFilter;
import cn.huijielong.common.utils.PageUtils;
import cn.huijielong.common.utils.Query;
import cn.huijielong.common.utils.RD;
import cn.huijielong.modules.cm.entity.ZoneEntity;
import cn.huijielong.modules.cm.service.ZoneService;
import cn.huijielong.modules.sys.controller.AbstractController;




/**
 * 省
 * 
 * @autho VSData vstar
 * @email vstar@gmail.com
 * @date 2018-11-21 19:05:33
 */
@RestController
@RequestMapping("/cm/zone")
public class ZoneProvinceController  extends AbstractController{
	@Autowired
	private ZoneService zoneService;
	
	/**
	 * 列表
	 */
	@NoAuthFilter
	@RequestMapping("/queryProvinces")
	public  List<ZoneEntity> queryProvinces(){
        return zoneService.queryProvinces();
	}
	@NoAuthFilter
	@RequestMapping("/queryCities/{provinceCode}")
	public  List<ZoneEntity> queryCities(@PathVariable("provinceCode") String provinceCode){
		return zoneService.queryCities(provinceCode);
	}
	@NoAuthFilter
	@RequestMapping("/queryCounties/{cityCode}")
	public  List<ZoneEntity> queryCounties(@PathVariable("cityCode") String cityCode){
		return zoneService.queryCounties(cityCode);
	}
	@NoAuthFilter
	@RequestMapping("/queryTowns/{countyCode}")
	public  List<ZoneEntity> queryTowns(@PathVariable("countyCode") String countyCode){
		return zoneService.queryTowns(countyCode);
	}
	
}
